package com.hnkywl.sts.action.xsgl;

import com.hnkywl.sts.service.xsgl.KhService;
import net.ruixin.web.struts2.SimpleActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created with IntelliJ IDEA.
 * User: jerry
 * Date: 13-4-24
 * Time: 上午9:15
 * To change this template use File | Settings | File Templates.
 */
@Namespace("/xsgl/khgl")
public class KhAction extends SimpleActionSupport {
    private KhService khService;
    //卡号编码
    private String khbm;
    //物资名称
    private String jtwzname;
    //规格型号
    private String jtwzggxh;

    private String wzbm;
    //仓库ID
    private Long ckid;

    private Long xsgsId;

    private Long sbgsId;
    //产地ID
    private Long cdid;
    //物资规格ID
    private Long wzggid;
    //分页组件 起始位置
    private int page;
    //分页组件 页面大小
    private int rows;

    @Action("kh")
    public String kh() {
        return SUCCESS;
    }

    @Action("khList")
    public void khList() {
        this.renderJson(this.khService.findAllKh(khbm,jtwzname,jtwzggxh,wzbm,ckid,xsgsId,sbgsId,cdid,wzggid, page, rows));
    }

    public String getKhbm() {
        return khbm;
    }

    public void setKhbm(String khbm) {
        this.khbm = khbm;
    }

    public String getJtwzname() {
        return jtwzname;
    }

    public void setJtwzname(String jtwzname) {
        this.jtwzname = jtwzname;
    }

    public Long getCkid() {
        return ckid;
    }

    public void setCkid(Long ckid) {
        this.ckid = ckid;
    }

    public Long getXsgsId() {
        return xsgsId;
    }

    public void setXsgsId(Long xsgsId) {
        this.xsgsId = xsgsId;
    }

    public Long getSbgsId() {
        return sbgsId;
    }

    public void setSbgsId(Long sbgsId) {
        this.sbgsId = sbgsId;
    }

    public Long getCdid() {
        return cdid;
    }

    public void setCdid(Long cdid) {
        this.cdid = cdid;
    }

    public Long getWzggid() {
        return wzggid;
    }

    public void setWzggid(Long wzggid) {
        this.wzggid = wzggid;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public String getJtwzggxh() {
        return jtwzggxh;
    }

    public void setJtwzggxh(String jtwzggxh) {
        this.jtwzggxh = jtwzggxh;
    }

    public String getWzbm() {
        return wzbm;
    }

    public void setWzbm(String wzbm) {
        this.wzbm = wzbm;
    }

    @Autowired
    public void setKhService(KhService khService) {
        this.khService = khService;
    }
}
